<?php
/**
 * Created by PhpStorm.
 * User: apple
 * Date: 2018/7/22
 * Time: 下午8:44
 */
namespace PddWechat\Models\Pos\Service;

use Dai\Framework\Base\BaseService;
use Dai\Framework\Base\BaseSessionInfo;
use Dai\Framework\Library\Log;
use PddWechat\Models\Pos\Data\PostInviteData;

class Poslist extends BaseService
{
    public function __construct()
    {
        $this->postInvateData = new PostInviteData();
    }

    public function execute($basePageInfo)
    {
        /** @var BaseSessionInfo $sessionData */
        $sessionData = $basePageInfo->sessionInfo;
        $openid = $sessionData->openId;
        $postListInfo = $this->postInvateData->getApplyListByOpenId($openid);
        Log::info("postListInfo" . json_encode($postListInfo,true));
        return $postListInfo;
    }
}